import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import { setupStore } from "@/store";
import { setupDirective } from "@/directive";

// import iView from 'iview'
// import 'iview/dist/styles/iview.css'
//全局引入
// import vue3Cron from 'vue3-cron'
// import 'vue3-cron/lib/vue3Cron.css' // 引入样式

import ElementPlus from "element-plus";
import "element-plus/dist/index.css";

// //引入markdown富文本编辑器
import mavonEditor from "mavon-editor";
import "mavon-editor/dist/css/index.css";
import VueMarkdownEditor from "@kangc/v-md-editor";
import "@kangc/v-md-editor/lib/style/base-editor.css";
import vuepressTheme from "@kangc/v-md-editor/lib/theme/vuepress.js";
import Prism from "prismjs";
import VMdPreview from "@kangc/v-md-editor/lib/preview";
import "@kangc/v-md-editor/lib/style/preview.css";
// 引入使用主题的样式
import "@kangc/v-md-editor/lib/theme/style/vuepress.css";

VMdPreview.use(vuepressTheme, {
  Prism,
});

VueMarkdownEditor.use(vuepressTheme, {
  Prism,
});

import "@/permission";

// 本地SVG图标
import "virtual:svg-icons-register";

// 国际化
import i18n from "@/lang/index";

// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";

const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);

//使用markdown富文本编辑器
app.use(mavonEditor);

app.use(VueMarkdownEditor);
app.use(VMdPreview);
app.use(ElementPlus);
// app.use(iView);
// app.use(vue3Cron);
app.use(router).use(i18n).mount("#app");
